package com.matrix.java.chap_04.example;

import java.util.Scanner;

public class Case4_05 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int num1 = (int) (Math.random() * 10);
        int num2 = (int) (Math.random() * 10);
        String numString1 = String.valueOf(num1);
        String numString2 = String.valueOf(num2);
        String stringNum = numString1.concat(numString2);
        System.out.println(stringNum);
        System.out.print("输入: ");
        String inputNum = input.next();
        if (inputNum.equals(stringNum)){
            System.out.println(10000);
        }else if (inputNum.contains(numString1) && inputNum.contains(numString2)){
            System.out.println(3000);
        }else if (inputNum.contains(numString1) || inputNum.contains(numString2)){
            System.out.println(1000);
        }else {
            System.out.println(0);
        }
        input.close();
    }
}
